<?php 
/////////////////////////////////////////////////////////////////////////////////////		
include "required_code.php"; 

				session_start();
				$ses_user_id =$_SESSION['ses_user_id'];
				$ses_std_id = $_SESSION['ses_std_id'];
				$concept=$_SESSION['concept'];
				$round=$_SESSION['round'];
				$ls=$_SESSION['ls'];
				if($ses_user_id <> session_id() or  $ses_std_id ==''){
					echo "Authentication failed";
					echo "<meta http-equiv='refresh' content='2;URL=index.php' />";
					}    
					else {
/////////////////////////////////////////////////////////////////////////////////////						
				?>
				
				<table width="800" border="1" align="center" cellpadding="0" cellspacing="0">
				  <tr>
					<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
					  <tr>
						<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
						  <tr>
							<td width="23%" bgcolor="#FFFFFF"><?php include "header.html"; ?></td>
							</tr>
						</table></td>
					  </tr>
					  <tr>
						<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
						  <tr>
						   
							<td width="80%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
							  <tr>
								<td bgcolor="#00CCFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
								  <tr>
									<td><div align="left"><tt><a href="progress.php">Home</a> &gt; </tt><tt><a href="learning_paths.php">Learning Paths</a> &gt; <?php call_concept_name($concept); ?> [R<?php echo $round; ?>/2]</tt> </div></td>
									<td>&nbsp;</td>
									<td><?php include "right_navi.php"; ?></td>
								  </tr>
								</table></td>
							  </tr>
							  <tr>
								<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
								  <tr>
									<td bgcolor="#FFFFFF"><br />
									  <table width="100%" border="0" cellspacing="0" cellpadding="5">
										<tr>
										  <td><table width="80%" border="2" cellspacing="0" cellpadding="0">
										    <tr>
										      <td colspan="3"><p>
										        <h2><?php call_concept_name($concept); ?></h2>
                                              </p>
										        <p>Your learning style is <?php echo $ls; ?>.<br />
									          </p></td>
									        </tr>
										    <tr>
										      <td>Learn</td>
										      <td><a target="_blank" href="material/concept<?php echo $concept; ?>/c<?php echo $concept; ?>-<?php echo $ls; ?>-r<?php echo $round; ?>.pdf">Click here</a></td>
										      <td>&nbsp;</td>
									        </tr>
										    <tr>
										      <td>Test</td>
										      <td><?php
											  $query2="SELECT * FROM fa_test_progress WHERE std_id=$ses_std_id AND concept=$concept";
							$db_result2=db_query($query2);
							$result2=mysql_fetch_array($db_result2);
							//echo $result2['pretest_sts'];
							if(($result2['fa1']=="") || (($result2['fa1']!="P")&&($result2['fa2']==""))){
								echo "<a href='fa_test.php'>Click here</a>";
							}
                                              
											  ?>
                                              </td>
										      <td><?php if(($result2['fa1']!="" && $result2['fa2']=="")||($result2['fa2']!="")){
								echo "<a href='fa_test_result.php'>Result</a>";
							}?></td>
									        </tr>
									      </table></td>
										</tr>
										<tr>
										  <td></td>
										</tr>
										<tr>
										  <td></td>
										</tr>
									  </table></td>
								  </tr>
								</table></td>
							  </tr>
							</table></td>
						  </tr>
						</table></td>
					  </tr>
					  <tr>
						<td bgcolor="#FFFFFF"><?php include "footer.html"; ?></td>
					  </tr>
					</table></td>
				  </tr>
				</table>
				</body>
				</html>
				<?php
				/////////////////////////////////////////////////////////////////////////////////////		
					$db_close=db_disconnect($db_open);
					}
/////////////////////////////////////////////////////////////////////////////////////		
?>
